#include <stdio.h>
int main(int argc, char const *argv[])
{
    int a1[5];//如果不定义数组内容，系统会自动赋值给数组
    for (int i = 0; i < 5; i++)
    {
        printf("a1[%d]=%d\n", i, a1[i]);
    }
    printf("***********************************************\n");

    int a2[5] = {1, 3, 5}; // 只给部分数组赋值，其余值为0
    for (int i = 0; i < 5; i++)
    {
        printf("a2[%d]=%d\n", i, a2[i]);
    }
    printf("***********************************************\n");

    static int a3[5]; // 对static数组不赋值，系统默认赋以0值
    for (int i = 0; i < 5; i++)
    {
        printf("a3[%d]=%d\n", i, a3[i]);
    }
    printf("***********************************************\n");

    int a4[] = {1, 2, 3, 4, 5};
    for (int i = 1; i < 5; i++)
    {
        printf("a4[%d]=%d\n", i, a4[i]);
    }

    return 0;
}
